package com.jackrain.nea.fc.dl.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;

/**
 * @author wuwenxue
 * @date 2018/05/28
 **/
@Mapper
public interface ViewDLPurOrderMapper {

//    @Select("SELECT ID FROM DL_B_PUR_REQ WHERE BILL_NO=#{billNo}")
//    Long selReqId(String billNo);
//
//    /**
//     * @param purReasonEcode 采购原因ecode
//     * @return 采购原因id
//     */
//    @Select("SELECT B.ID AS BILLDIM_ITEM_ID " +
//            "FROM DL_C_BILLDIM A,DL_C_BILLDIM_ITEM B " +
//            "WHERE B.DL_C_BILLDIM_ID=A.ID AND A.TAG='PUR_REASON' AND B.ECODE=#{purReasonEcode}")
//    Long purReasonId(String purReasonEcode);


    @Select("SELECT ID FROM PS_C_SKU " +
            "WHERE ECODE=#{ecode} AND CP_C_DISTRIB_ID=0 ")
    HashMap selSkuData(String ecode);

    @Select("SELECT ID FROM CP_C_SUPPLIER " +
            "WHERE ECODE=#{ecode}")
    HashMap selSupplierData(String ecode);

    @Select("SELECT ID FROM CP_C_STORE " +
            "WHERE ECODE=#{storeEcode}")
    HashMap selStoreData(String storeEcode);


}
